﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CAPTCHA.aspx.cs" Inherits="jQuery.Ajax.CAPTCHA" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <style>
        a {
            margin: 5px;
            font-size:12px; 
            padding: 5px; 
            border: 1px dotted lightsalmon; 
            color: brown; 
            cursor: pointer;
        }
        #validateCode {
            width: 80px; 
            height: 25px; 
            border: 1px dashed lightgray; 
            cursor: pointer;
        }
    </style>
    
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <p>验证码：<img id="validateCode" style="" alt="点击刷新验证码" onclick="refreshCode();"/><a  onclick="refreshCode();">看不清,刷新验证码</a></p>
    <p>输入验证码：<asp:TextBox id="inputCode" runat="server"></asp:TextBox></p>
    <p><asp:Button id="btnSubmit" runat="server" Text="提 交" onclick="btnSubmit_Click"/></p>
    </div>
    </form>
    <script type="text/javascript">
        window.onload = refreshCode();

        function refreshCode() {
            document.getElementById('validateCode').src = 'ashx/ValidateCode.ashx?r=' + Math.random();
            //alert(document.getElementById('validateCode').src);
        }
    </script>
</body>
</html>
